Accessing a Model Set

A persistence unit contains data as a group of linked model sets. The model sets are arranged in a tree-like hierarchy with a single model set at the top.

The top model set in a persistence unit contains the bulk of modeling data. The erwin DM API uses the abbreviation EMX to identify the top model set.

The EMX model set owns a secondary model set, abbreviated as EM2, that contains user options and user interface settings.

The ISCSession interface allows you to open the top model set by simply providing a pointer to the ISCPersistenceUnit interface in ISCSession::Open call.

It is possible to iterate over all model sets constituting a persistence unit. While iterating, a pointer to the ISCModelSet interface can be used to open a session with the particular model set. This is done by submitting the pointer to ISCSession::Open call as the first parameter, instead of a persistence unit.

The ModelSet property of the ISCPersistenceUnit interface provides the starting point for iteration over a persistence unit's model sets. The use of the OwnedModelSets property of ISCModelSet allows you to iterate over the next level of model sets in the persistence unit.